Repository navigation
iPhone app: address first, password only if the server asks - #2
Conversation
Published from the private repository by oss-sync. - iPhone app: address first, password only if the server asks 1 file changed, 56 insertions(+), 43 deletions(-)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09ce40fd8e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <Input | ||
| value={address} | ||
| onChangeText={setAddress} | ||
| onChangeText={(v) => { setAddress(v); setAskPassword(false); setError('') }} |
There was a problem hiding this comment.
Clear hidden credentials when the address changes
After a failed sign-in, editing the server address hides the credential fields but leaves username and password in state. The next Connect attempt sees both values as nonempty and posts them to the newly entered host without showing or confirming them, potentially disclosing the owner's password to an unintended server. Clear the password when the address changes, or require a fresh password-stage confirmation for the new base URL.
Useful? React with 👍 / 👎.
| if ('needsPassword' in out) { | ||
| if (askPassword) { warn(); setError("Sign in with the owner's username and password.") } | ||
| else { setAskPassword(true); setTimeout(() => userRef.current?.focus(), 50) } | ||
| return |
There was a problem hiding this comment.
Preserve the Access token between connection stages
On a Cloudflare Access-protected install, the first Connect obtains an Access token and reaches needsPassword, but this return path discards the token instead of retaining it. Submitting the newly displayed credentials initializes accessToken from the still-unsaved connection, so it opens Cloudflare Access a second time before Krakatoa login; every connection therefore requires two Access authentications. Keep the transient token through the password stage while still persisting it only after successful connection.
AGENTS.md reference: mobile/AGENTS.md:L51-L57
Useful? React with 👍 / 👎.
Published from the private repository by oss-sync.
1 file changed, 56 insertions(+), 43 deletions(-)